The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
Changes 09
META.yml 33
SIGNATURE 99
lib/Time/y2038/Everywhere.pm 11
lib/Time/y2038.pm 11
t/timegm.t 1616
y2038/time64.c 10
7 files changed (This is a version diff) 3139
@@ -1,3 +1,12 @@
+20100225  Thu Feb 25 23:09:15 PST 2010
+  Bugs
+  * Accidentally left a debugging print in mktime()
+
+  Tests
+  * Test against 2006, before the American DST rules changed, so
+    as not to break on old machines.
+
+
 20100223  Tue Feb 23 11:57:23 PST 2010
   Build
   * Fix for JSON.pm not being available for Build.PL
@@ -20,12 +20,12 @@ name: Time-y2038
 provides:
   Time::y2038:
     file: lib/Time/y2038.pm
-    version: 20100223
+    version: 20100225
   Time::y2038::Everywhere:
     file: lib/Time/y2038/Everywhere.pm
-    version: 20100223
+    version: 20100225
 requires:
   perl: v5.6.1
 resources:
   license: http://dev.perl.org/licenses/
-version: 20100223
+version: 20100225
@@ -15,29 +15,29 @@ not run its Makefile.PL or Build.PL.
 Hash: SHA1
 
 SHA1 4d4b9fe7a9836ea619fbc68874efa7d7e6d60cd2 Build.PL
-SHA1 7fc8ff8b68e2ff595276f9ca114043983cf06464 Changes
+SHA1 ba2cd06b37426fbe4f35abb48450892d0ba479b7 Changes
 SHA1 fb110d0098fa623a2d6566e86a6d630110f60d23 INSTALL
 SHA1 0abcc59e081d5fa311e6b18c24f94a4f0a3d47b9 MANIFEST
 SHA1 b42c7cde42d44221603a84f6bdfeb4a6005604e5 MANIFEST.SKIP
-SHA1 6a1751990aa55a3de61263b38f8ffa092f30d804 META.yml
+SHA1 4ad2939ae908ea735239fd0fb15e0afa6992fbdd META.yml
 SHA1 d2f3d11e9f7f0fd886b47f9257352eb8b71bf4a8 check_max.c
 SHA1 f952a76c3122bcb434c86e606583b11fd1bd3f4a inc/Local/Module/Build.pm
-SHA1 7b2d1ad8534364e86a32e38f46d8bf642bce4cae lib/Time/y2038.pm
+SHA1 46655ecd65fdca0fe725979a4a0c0e209c5ed8a6 lib/Time/y2038.pm
 SHA1 666e25e498a3bd6bdb9bcab3f9e5b8812e4567f3 lib/Time/y2038.xs
-SHA1 644a9999fe2b2628be6825c527f75b2205b2a0b8 lib/Time/y2038/Everywhere.pm
+SHA1 733537345b80d2edba102212d2591b24a7a8581a lib/Time/y2038/Everywhere.pm
 SHA1 6c52173a196e81890474ea47f31ba2aeb3b7939c munge_config
 SHA1 1fa62ec9022c346fa26bf94652114e38b5efc5f0 t/everywhere.t
 SHA1 53f53a00f22f19b5f16d7801e730e57c173f61c7 t/time.t
-SHA1 0f7a96de5a04d9326e963cb480a50ebf783c5b2c t/timegm.t
+SHA1 851b9264b863b168ed07d17720e0176a0fe67d7c t/timegm.t
 SHA1 a915486e0da8713dead77ca21d041c8ae6b6676e typemap
-SHA1 3c5ee25d8c61ba2812a3421c70c5c7a0e174323d y2038/time64.c
+SHA1 e05084cdf3b64b4fa9883a41aefaa5b3d3e21407 y2038/time64.c
 SHA1 0d7cf54304f41d3dbfd803d597c29d62b845ce2a y2038/time64.h
 SHA1 015c751b69ae7971c626034ad2b27eaabe5a76a7 y2038/time64_config.h.in
 SHA1 0f73eae859e4709f30194d5e989487ffa7fd28d2 y2038/time64_limits.h.in
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.13 (Darwin)
 
-iEYEARECAAYFAkuENHkACgkQWMohlhD1QyfiTQCaA6j2aFkp8iBQmVOtyzhYyUTD
-XDUAniSuijqn+QGhg+v+ML+CuqPox/fu
-=wJZc
+iEYEARECAAYFAkuHdCAACgkQWMohlhD1QyctMgCgwOvJ+LFEFcmCG9snFxnjCDcR
+iPIAoL6Mv3P9NX1xGeSYJKtRswLUH87m
+=xaTK
 -----END PGP SIGNATURE-----
@@ -3,7 +3,7 @@ package Time::y2038::Everywhere;
 use strict;
 use warnings;
 
-our $VERSION = '20100223';
+our $VERSION = '20100225';
 
 use Time::y2038;
 
@@ -6,7 +6,7 @@ use warnings;
 use base qw(Exporter);
 use XSLoader;
 
-our $VERSION = '20100223';
+our $VERSION = '20100225';
 our @EXPORT = qw(localtime gmtime timegm timelocal);
 
 XSLoader::load __PACKAGE__, $VERSION;
@@ -25,43 +25,43 @@ for my $time (-2**52, -1, 0, 1, 2**52) {
 SKIP: {
     skip "Tests specific to US/Pacific time zone", 4 unless $Test_Localtime;
 
-    # 1 second before new American DST spring ahead
-    my $time = 1173607199;
-    cmp_ok timelocal(59, 59, 1, 11, 2, 107), '==', $time,
+    # 1 second before old American DST spring ahead
+    my $time = 1143971999;
+    cmp_ok timelocal(59, 59, 1, 2, 3, 106), '==', $time,
       'DST just before spring ahead';
-    is localtime($time), 'Sun Mar 11 01:59:59 2007';
+    is localtime($time), 'Sun Apr  2 01:59:59 2006';
 
     $time++;
-    cmp_ok timelocal(0, 0, 3, 11, 2, 107), '==', $time,
+    cmp_ok timelocal(0, 0, 3, 2, 3, 106), '==', $time,
       'DST just after spring ahead';
-    is localtime($time), 'Sun Mar 11 03:00:00 2007';
+    is localtime($time), 'Sun Apr  2 03:00:00 2006';
 
 
     # 1 second before fall back.
-    $time = 1194163199;
-    cmp_ok timelocal(59, 59, 0, 4, 10, 107), '==', $time,
+    $time = 1162108799;
+    cmp_ok timelocal(59, 59, 0, 29, 9, 106), '==', $time,
       'DST just before fall back';
-    is localtime($time), 'Sun Nov  4 00:59:59 2007';
+    is localtime($time), 'Sun Oct 29 00:59:59 2006';
 
-    # Sun Nov  4 01:00:00 2007 DST, one second later
+    # Sun Oct 29 01:00:00 2006 DST, one second later
     $time++;
-    cmp_ok timelocal(0, 0, 1, 4, 10, 107, undef, undef, 1), '==', $time,
+    cmp_ok timelocal(0, 0, 1, 29, 9, 106, undef, undef, 1), '==', $time,
       'DST at 1am';
-    is localtime($time), 'Sun Nov  4 01:00:00 2007';
+    is localtime($time), 'Sun Oct 29 01:00:00 2006';
 
 
     # After one hour, it's still 1am but no longer DST
     $time += 3600;
-    cmp_ok timelocal(0, 0, 1, 4, 10, 107, undef, undef, 0), '==', $time,
+    cmp_ok timelocal(0, 0, 1, 29, 9, 106, undef, undef, 0), '==', $time,
       'not DST at 1am';
-    is localtime($time), 'Sun Nov  4 01:00:00 2007';
+    is localtime($time), 'Sun Oct 29 01:00:00 2006';
 
 
     # An hour later it's 2am.
     $time += 3600;
-    cmp_ok timelocal(0, 0, 2, 4, 10, 107), '==', $time,
+    cmp_ok timelocal(0, 0, 2, 29, 9, 106), '==', $time,
       '3am after DST fall back is 2 hours after 2am';
-    is localtime($time), 'Sun Nov  4 02:00:00 2007';
+    is localtime($time), 'Sun Oct 29 02:00:00 2006';
 }
 
 
@@ -613,7 +613,6 @@ Time64_T mktime64(const struct TM *input_date) {
 
     if( date_in_safe_range(input_date, &SYSTEM_MKTIME_MIN, &SYSTEM_MKTIME_MAX) )
     {
-        printf("Using system mktime\n");
         copy_TM64_to_tm(input_date, &safe_date);
         return (Time64_T)mktime(&safe_date);
     }